package uk.ac.bath.machines.bool;
import uk.ac.bath.legacy.VectorState;
import java.io.*;
import uk.ac.bath.legacy.Operator;

public class Link extends Operator{

    public void tick(VectorState in,VectorState out) {
	out.at(0).set(in.at(1));
    }


    public void tick(VectorState in,VectorState out,int map[]) {
	out.v[map[0]].set(in.v[map[1]]);
    }

    public int getStateSize() {
        return 2;
    }

    public int getParamSize() {
        return 0;
    }

    public int nIn() {
	return 1;
    }

    public int nOut() {
	return 1;
    }
    
    public Object clone() {
        return this;   //OK no state
    }

    public void toString(StringWriter w) {
        w.write("Link ");
    }

}
